<{include file="admin:common/header.html"}>
<div class="page-title">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" >
      <tr>
        <td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
        <th><{$MOD.title}></th>
        <td align="right"><{link ctl="home/home:index" priv="hidden" class="button"}></td>
        <td width="15"></td>
      </tr>
    </table>
</div>
<div class="page-data">

    <form action="?home/home-create.html" mini-form="home-form" method="post" ENCTYPE="multipart/form-data">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
    <li><a href="#table-info">基本信息</a></li>
    <li><a href="#table-attr">小区属性</a></li>
</ul>
<table width="100%" border="0" cellspacing="0" id="table-info" class="table-data form">
<tr><th class="w-100">城市：</th><td><b class="blue"><{$cityList[$city_id].city_name}></b><select name="data[area_id]" class="w-150"><{widget id="data/area" city_id=$city_id value=$detail.area_id}></select></td></tr>
<tr><th>小区名称：</th><td><input type="text" name="data[title]" value="<{$detail.title|default:''}>" class="input w-300"/></td></tr>
<tr><th>简称：</th><td><input type="text" name="data[name]" value="<{$detail.name|default:''}>" class="input w-300"/></td></tr>
<tr><th>均价：</th><td><input type="text" name="data[price]" value="<{$detail.price|default:''}>" class="input w-300"/></td></tr>
<tr><th>地址：</th><td><input type="text" name="data[addr]" value="<{$detail.addr|default:''}>" class="input w-300"/></td></tr>
<tr><th>联系电话：</th><td><input type="text" name="data[phone]" value="<{$detail.phone|default:''}>" class="input w-300"/></td></tr>
<tr><th>QQ群：</th><td><input type="text" name="data[qq_qun]" value="<{$detail.qq_qun|default:''}>" class="input w-300"/></td></tr>
<tr><th>缩略图：</th><td><input type="file" name="data[thumb]" class="input w-300" /></td></tr>
<tr><th>交房时间：</th><td><input type="text" name="data[jf_date]" value="<{$detail.jf_date|default:''}>" class="input w-100" date="jf" readonly/></td></tr>
<tr><th>开盘时间：</th><td><input type="text" name="data[kp_date]" value="<{$detail.kp_date|default:''}>" class="input w-100" date="kp" readonly/></td></tr>
<tr><th>开发商：</th><td><input type="text" name="data[kfs]" value="<{$detail.kfs|default:''}>" class="input w-300"/></td></tr>
<tr><th>百度地图：</th>
	<td>
		<label>经度:<input type="text" name="data[lng]" value="<{$detail.lng|default:''}>" id="Bmap_marker_lng" class="input w-100"/></label>
		<label>纬度:<input type="text" name="data[lat]" value="<{$detail.lat|default:''}>" id="Bmap_marker_lat" class="input w-100"/></label>	
		<span class="tip-comment">使用百度地图经纬度<a map-marker="#Bmap_marker_lng,#Bmap_marker_lat" class="button"><b>拾取工具</b></a></span>
	</td>
</tr>
<tr><th>详情：</th><td><textarea name="data[content]" kindeditor="full" style="width:800px;height:350px;"><{$detail.content}></textarea><br /></td></tr>
<tr><th>浏览量：</th><td><input type="text" name="data[views]" value="<{$detail.views|default:''}>" class="input w-100"/></td></tr>
<tr><th>排序：</th><td><input type="text" name="data[orderby]" value="<{$detail.orderby|default:'50'}>" class="input w-100"/></td></tr>
<tr>
    <th>审核：</th>
    <td>
        <label><input type="radio" name="data[audit]" checked="checked" value="1"/>发布</label>&nbsp;&nbsp;
        <label><input type="radio" name="data[audit]" value="0"/>待审</label>
    </td>
</tr>
<tr><th class="clear-th-bottom"></th><td class="clear-td-bottom" colspan="10"><input type="submit" class="bt-big" value="提交数据" /></td></tr>
</table>        
<table width="100%" border="0" cellspacing="0" class="table-data form" id="table-attr" style="display:none;">
<{widget id="attr/form" from="zx:home"}>
<tr><th class="clear-th-bottom"></th><td class="clear-td-bottom" colspan="10"><input type="submit" class="bt-big" value="提交数据" /></td></tr>
</table>        
        
</form></div>
<script type="text/javascript" src="<{$pager.res}>/kindeditor/kindeditor.js"></script>
<script type="text/javascript" src="<{$pager.res}>/script/widget.bmap.js"></script>
<script type="text/javascript">
(function(K, $){
var editor = KindEditor.create('textarea[kindeditor]', {uploadJson : '?magic/upload-editor.html', extraFileUploadParams:{OATOKEN:"<{$OATOKEN}>"}});
})(window.KT, window.jQuery);
</script> <script type="text/javascript">
(function(K, $){
    $("div.page-data").tabs();
$("select[name='data[city_id]']").live('change', function(){
	var city_id = $(this).val();
	if(!city_id){return false;}
	$.getJSON("?data/area-city-"+city_id+".html", function(ret){
		if(ret.error){
			Widget.MsgBox.error(ret.message.join(","));
		}else if(ret.areas.length>0){
			var html = "";
			for(var i=0; i<ret.areas.length; i++){
				html += '<option value="'+ret.areas[i].area_id+'">'+ret.areas[i].area_name+'</option>';
			}
			$("select[name='data[area_id]']").html(html);		
		}else{
			$("select[name='data[area_id]']").html('<option value="">--</option>');
		}
	});
});
})(window.KT, window.jQuery);
</script>
<{include file="admin:common/footer.html"}>